<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.lp.cfg.ProConfig"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/WEB-INF/oss/iot/common/variable.jsp"%>
<%@ include file="/WEB-INF/oss/iot/common/variable_js.jsp"%>
<%@ include file="/WEB-INF/oss/iot/common/resource_lib.jsp"%>
<script type="text/javascript" src="<%=basePath%>/lib/distpicker/distpicker.data.js"  charset="UTF-8"></script>
<script type="text/javascript" src="<%=basePath%>/lib/distpicker/distpicker.js"  charset="UTF-8"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=<%=ProConfig.Map.BAIDU_MAP_KEY%>"></script>
<style type="text/css">
	
	.dashboard-menu{
		border-top:1px solid #ecf0f5;
	}
	.app-container{
		background:  #f2f2f2;width: 100%;border-top:1px solid #ecf0f5;
	}
	
	.box-white {
	    width: 97%;
	    min-width: 897px;
	    padding-bottom: 0;
	    margin: 0 auto;
	}
	.box {
	    padding: 10px;
	    padding-top:1px;
	    border-left: 1px solid #d2d6de;
	    border-right: 1px solid #d2d6de;
	    border-bottom: 1px solid #d2d6de;
	}
	.box {
	    border: 0!important;
	    box-shadow: 0 0 2px 1px rgba(13,5,9,.08)!important;
	}
	.box {
	    position: relative;
	    border-radius: 3px;
	    background: #fff;
	    border-top: 3px solid #d2d6de;
	    margin-bottom: 20px;

	    box-shadow: 0 1px 1px rgba(0,0,0,.1);
	}
	.sceneList-info{
		padding-top: 10px;
		padding-left: 10px;
	}
	.p-title{
		padding: 20px 0;
		font-size: 20px;
		margin-left: -50px;
	}
</style>
</head>
<body>
	<div>
		<!--  下方部位  -->
		<div>
			<div  >
				<div class="">
					<div class="container-layout sceneList-info">
						<div class="box join-device-box" style="padding-top:20px;padding-left: 20px;">
							<div class="clearfix" style="width: 600px;">
								<div>
									<div type-option="form_submit" id="userInfoHeader" 
										  config-option="url:'/user/modify/password', method :'put',
														  submit :'.modify-Btnx',
														   before:'beforefunc',
														  success:'sunccessRe' ">
											<input type="hidden" type-name="user_key" value="${user.user_key}"  >
											<div class="form-line">
												<span class="red">*</span>&nbsp;<span>Original password:</span>
												<div class="pb-10 pt-10">
													<input placeholder="Original password" type="password"  type-name="password" validate="empty" class="layui-input" >
												</div>	
											</div>
											<div class="form-line">
												<span class="red">*</span>&nbsp;<span>New password:</span>
												<div class="pb-10 pt-10">
													<input placeholder="New password" type="password"  type-name="newpassword" validate="empty" class="layui-input password" >
												</div>
											</div>
											<div class="form-line">
												<span class="red">*</span>&nbsp;<span>New password confirmation:</span>
												<div class="pb-10 pt-10">
													<input placeholder="New password confirmation" type="password" validate="empty" class="layui-input password-confirm" >
												</div>
											</div>
											<div class="form-line clearfix">
												<button class="modify-Btnx button ml-20 bg-iot button-big float-right">Confirm modification</button>
											</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div id="map_container" class="hide">
			<div  style="height: 350px;width: 100%;">
				<div id="map"></div>
			</div>
		</div>
	</div>
</body>

<script type="text/javascript">
	function beforefunc(){
		if( $(".password-confirm").val() != $(".password").val() ){
			tip("The two password entries are inconsistent, please check");
			return false ;
		}
		return true ;
	}
	function sunccessRe(data){
		if(isOK(data)){
			tip("Modified successfully");
		}else{
			tip(data.statusMsg);
		}
	}
</script>
</html>